<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div v-once>{{msg}}</div>
        <div v-if="1<2">
            {{msg}}
        </div>
        <div v-else>
            哈哈消失了
        </div>
    </div>
</body>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<script>
    new Vue({
        el: "#app",
        data: {
            msg: "请输入haha",
            flag:false

        },
        methods: {

        },
    })

</script>

</html>